﻿/**************************************************************
*作者：Leon
*创建时间：2022/1/11 20:41:01
**************************************************************/

namespace MyBlog.WebAPI.JWT;

public static class ApiResultHelper
{
    public static ApiResult Success(dynamic data)
    {
        return new()
        {
            Code = 200,
            Data = data,
            Msg = "操作成功",
            Total = 0
        };
    }
    public static ApiResult Success(dynamic data,int total)
    {
        return new()
        {
            Code = 200,
            Data = data,
            Msg = "操作成功",
            Total = total
        };
    }
    public static ApiResult Error(string msg)
    {
        return new()
        {
            Code = 500,
            Data =null,
            Msg =msg,
            Total = 0
        };
    }
}
